<?php 
if(!isset($tempSex))
  $tempSex = isset($_POST['sex']) ? $_POST['sex'] : null;
?>
<select name="sex">
  <option value="-1">--</option>
  <option value="1" <?php echo ($tempSex == 1) ? 'selected="selected"' : null; ?> >Мужской</option>
  <option value="2" <?php echo ($tempSex == 2) ? 'selected="selected"' : null; ?> >Женский</option>

</select>